package com.mingqijia.gassafety.job.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.util.Date;

/**
 * <p>
 * 客户信息导出response
 *
 * @author wanghai
 * @since 2022-03-09
 */

@Data
public class ConsumerExport {
    private Integer id;
    private Integer consumerId;

    @ApiModelProperty(value = "用户id")
    private String memberId;
    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "户名")
    private String custName;

    @ApiModelProperty(value = "户号")
    private String subsCode;

    @ApiModelProperty(value = "户址")
    private String custAddress;

    @ApiModelProperty(value = "户主手机号")
    private String custPhone;

    @ApiModelProperty(value = "设备经纬度")
    private String location;

    @ApiModelProperty(value = "户主 用户类型")
    private String custType;

    @ApiModelProperty(value = "气户状态")
    private String custStatus;



    @ApiModelProperty(value = "名字")
    private String name;

    @ApiModelProperty(value = "所属行业type -字典")
    private String industryType;

    @ApiModelProperty(value = "所属行业name")
    private String industryName;

    @ApiModelProperty(value = "创建时间")
    private String createdAt;


    @ApiModelProperty(value = "客户序号")
    private String consumerSeq;



    @ApiModelProperty("设备ID")
    private String equipmentId;

    @ApiModelProperty("设备号")
    private String imei;

    @ApiModelProperty("设备名称")
    private String equipmentName;

    @ApiModelProperty(value = "设备厂商")
    private String equipmentManufacturer;

    @ApiModelProperty("设备类型")
    private String equipmentType;

    @ApiModelProperty("设备类型名称")
    private String equipmentTypeName;

    @ApiModelProperty("设备位置")
    private String installationPosition;

    @ApiModelProperty(value = "检测类型")
    private String detectionType;

    @ApiModelProperty("设备状态 0:离线 1:正常 2:低报 3:高报 4:故障 5:屏蔽")
    private String equipmentStatus;

    @ApiModelProperty("设备状态信息")
    private String equipmentStatusInfo;

    @ApiModelProperty(value = "运营商")
    private String operators;

    @ApiModelProperty(value = "通讯方式")
    private String communicationMode;

    @ApiModelProperty("最近一次上报时间")
    private String  latestTime;

    @ApiModelProperty("电池电压")
    private Double btV;

    @ApiModelProperty("信号情况")
    private Integer signal;

    @ApiModelProperty("信号情况说明")
    private String signalStr;

    @ApiModelProperty("气体浓度")
    private String xlel;

    @ApiModelProperty(value = "设备绑定时间")
    private String bindingTime;

    @ApiModelProperty(value = "客户经纬度")
    private String position;

    @ApiModelProperty(value = "电磁阀名称")
    private String valveName;

    @ApiModelProperty(value = "电磁阀型号")
    private String valveModel;

    @ApiModelProperty(value = "电磁阀材质")
    private String valveMaterial;

    @ApiModelProperty(value = "电磁阀厂家")
    private String valveManufacturer;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "电磁阀关联时间")
    private Date valveBindTime;

    @ApiModelProperty(value = "联系人（级别1）姓名")
    private String contactName1;
    @ApiModelProperty(value = "联系人（级别1）联系方式")
    private String contactPhone1;
    private String level1;
    private String level2;
    private String level3;
    private String level4;
    private String level5;
    private String level6;
    private String level7;
    private String level8;
    private String level9;
    private String level10;

    @ApiModelProperty(value = "联系人（级别2）姓名")
    private String contactName2;
    @ApiModelProperty(value = "联系人（级别2）联系方式")
    private String contactPhone2;

    @ApiModelProperty(value = "联系人（级别3）姓名")
    private String contactName3;
    @ApiModelProperty(value = "联系人（级别3）联系方式")
    private String contactPhone3;

    @ApiModelProperty(value = "联系人（级别4）姓名")
    private String contactName4;
    @ApiModelProperty(value = "联系人（级别4）联系方式")
    private String contactPhone4;

    @ApiModelProperty(value = "联系人（级别5）姓名")
    private String contactName5;
    @ApiModelProperty(value = "联系人（级别5）联系方式")
    private String contactPhone5;

    @ApiModelProperty(value = "联系人（级别6）姓名")
    private String contactName6;
    @ApiModelProperty(value = "联系人（级别6）联系方式")
    private String contactPhone6;

    @ApiModelProperty(value = "联系人（级别7）姓名")
    private String contactName7;
    @ApiModelProperty(value = "联系人（级别7）联系方式")
    private String contactPhone7;
    @ApiModelProperty(value = "联系人（级别8）姓名")
    private String contactName8;
    @ApiModelProperty(value = "联系人（级别8）联系方式")
    private String contactPhone8;
    @ApiModelProperty(value = "联系人（级别9）姓名")
    private String contactName9;
    @ApiModelProperty(value = "联系人（级别9）联系方式")
    private String contactPhone9;
    @ApiModelProperty(value = "联系人（级别10）姓名")
    private String contactName10;
    @ApiModelProperty(value = "联系人（级别10）联系方式")
    private String contactPhone10;

    @ApiModelProperty(value = "服务信息")
    private String serviceInfo;
    @ApiModelProperty(value = "服务状态")
    private Integer serviceStatus;
    @ApiModelProperty(value = "服务状态")
    private String serviceStatusName;
    @ApiModelProperty(value = "服务开始日期")
    private String startDate;
    @ApiModelProperty(value = "服务结束日期")
    private String endDate;
    @ApiModelProperty(value = "imei前缀")
    private String imeiBefore;


    public void setContact(Object c) {
        if (StringUtils.isEmpty(c)) return;
        String[] contacts=(String[])c;
        if (contacts.length <= 0) return;
        this.contactName1 = contacts[0];
        this.contactPhone1 = contacts[1];
        this.contactName2 = contacts[2];
        this.contactPhone2 = contacts[3];
        this.contactName3 = contacts[4];
        this.contactPhone3 = contacts[5];
        this.contactName4 = contacts[6];
        this.contactPhone4 = contacts[7];
        this.contactName5 = contacts[8];
        this.contactPhone5 = contacts[9];
        this.contactName6 = contacts[10];
        this.contactPhone6 = contacts[11];
        this.contactName7 = contacts[12];
        this.contactPhone7 = contacts[13];
        this.contactName8 = contacts[14];
        this.contactPhone8 = contacts[15];
        this.contactName9 = contacts[16];
        this.contactPhone9 = contacts[17];
        this.contactName10 = contacts[18];
        this.contactPhone10 = contacts[19];
        this.level1 = contacts[20];
        this.level2 = contacts[21];
        this.level3 = contacts[22];
        this.level4 = contacts[23];
        this.level5 = contacts[24];
        this.level6 = contacts[25];
        this.level7 = contacts[26];
        this.level8 = contacts[27];
        this.level9 = contacts[28];
        this.level10 = contacts[29];
    }

    @ApiModelProperty(value = "燃气公司")
    private String companyName;
}
